#define _CRT_SECURE_NO_WARNINGS 1
#include "tcpserver.hpp"

static void Usage(std::string name)
{
	std::cout << "Usage :" << name << " port " << std::endl;
}

int main(int argc, char* argv[])
{
	if (argc != 2)
	{
		Usage(argv[0]);
		exit(1);
	}

	// std::string ip = argv[1];
	uint16_t port = atoi(argv[1]);

	std::unique_ptr<server> svr(new server(port));

	svr->init();
	svr->start();

	return 0;
}